﻿/******************************************************************************
 * 
 * Announce: CSharpKit, Basic algorithms, components and definitions.
 *           Copyright (C) ShenYongchen.
 *           All rights reserved.
 *   Author: 申永辰.郑州 (shenyczz@163.com)
 *  WebSite: http://github.com/shenyczz/CSharpKit
 *
 * THIS CODE IS LICENSED UNDER THE MIT LICENSE (MIT).
 * THIS CODE IS PROVIDED *AS IS* WITHOUT WARRANTY OF 
 * ANY KIND, EITHER EXPRESS OR IMPLIED, INCLUDING ANY
 * IMPLIED WARRANTIES OF FITNESS FOR A PARTICULAR
 * PURPOSE, MERCHANTABILITY, OR NON-INFRINGEMENT.
 * 
******************************************************************************/

using System;

namespace CSharpKit.Numerics.Distributions
{
    /// <summary>
    /// Probability Distribution.（概率分布） // Distributing
    /// </summary>
    public abstract class DistributionBase : IDistribution
    {
        // SystemRandomSource.Default
        protected DistributionBase()
            : this(new SystemRandomSource()) { }

        protected DistributionBase(IRandom random)
        {
            _random = random;
            CheckDistributionParameters = true;
        }

        protected IRandom _random;
        /// <summary>
        /// 用于绘制随机样本的随机数生成器 Randomizer
        /// </summary>
        public IRandom RandomSource
        {
            get => _random;
            set => _random = value;
        }


        /// <summary>
        /// 检查分布参数
        /// </summary>
        public static bool CheckDistributionParameters { get; set; }


        //}}@@@
    }

}
